package com.cloud.service.impl;

import com.cloud.dao.StorageDao;
import com.cloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @BelongsProject: my
 * @BelongsPackage: com.cloud.service.impl
 * @Author: ji ge
 * @CreateTime: 2024-02-04  14:59
 * @Description: TODO
 * @Version: 1.0
 */
@Service
public class storageServiceImpl implements StorageService{
    private static final Logger LOGGER =  LoggerFactory.getLogger(storageServiceImpl.class);

    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        LOGGER.info("------->storage-service中扣减库存开始");
        storageDao.decrease(productId, count);
        LOGGER.info("------->storage-service中扣减库存结束");
    }
}
